import { lazy } from 'react';
import { Navigate } from 'react-router-dom';
import Home from '../path/home/Index'
import Login from '../path/login/Index'
import Error from '../path/404/Index'
import { Children } from "react";
let Order = lazy(() => import('../path/order/Index'))
let User = lazy(() => import('../path/user/Index'))
export const homee = [
    {
        path: '/home/order',
        element: <Order></Order>,
        title:'小象管理'
    },
    {
        path: '/home/user',
        element: <User></User>,
        title:'用户管理'
    }
]
let router = [
  {
    path: "/",
    element: <Navigate to={"/home/order"}></Navigate>,
  },
  {
    path: "/home",
    element: <Home></Home>,
    children: homee,
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
  {
    path: "*",
    element: <Error></Error>,
  },
];
export default router